package com.studio701.carguard.service.imp;

import com.studio701.carguard.pojo.CarManagement;
import com.studio701.carguard.mapper.CarManagementMapper;
import com.studio701.carguard.service.ICarManagementService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xjc
 * @since 2022-03-29
 */
@Service
public class CarManagementServiceImpl extends ServiceImpl<CarManagementMapper, CarManagement> implements ICarManagementService {

    @Autowired
    CarManagementMapper carManagementMapper;

    @Override
    public boolean removeCarByUserIdAndCId(Integer userId, Integer cId) {
        return carManagementMapper.removeCarByUserIdAndCId(userId, cId);
    }

    @Override
    public boolean updateByUserIdAndCId(CarManagement carManagement) {
        return carManagementMapper.updateByUserIdAndCId(carManagement);
    }

    @Override
    public CarManagement getCarByUserIdAndCId(Integer userId, Integer cId) {
        return carManagementMapper.getCarByUserIdAndCId(userId, cId);
    }
}
